#pragma once

#include <QtCore/QString>

#include "exports.hpp"
#include "Attribute.hpp"




namespace db
{
	class DB_SCHEMA_API TableAttribute
		: public Attribute
	{
	private:

		Type          m_type;
		QString       m_name;
		Flags         m_flags;
		std::size_t   m_size;

	public:

		TableAttribute(Type type, QString name, Flags flags = Flags::None, std::size_t size = 0);
		virtual ~TableAttribute();



		/**
		 * @returns the name of this attribute
		 */
		virtual QString name() const;

		/**
		 * @returns the type of this attribute
		 */
		virtual Type type() const;

		/**
		 * @returns the flags of this attribute
		 */
		virtual Flags flags() const;

		/**
		 * @returns the size of this attribute (for strings, etc...)
		 */
		virtual std::size_t size() const;
	};
	///////////////////////////////////////////////////////////////////////////////////////////////
}
///////////////////////////////////////////////////////////////////////////////////////////////////
